/**
 * Created with IntelliJ IDEA.
 * User: ajhin
 * Date: 3/9/14
 * Time: 11:18 PM
 * To change this template use File | Settings | File Templates.
 */
package com.societyGames.sortEngine
{
/**
 * Links the Y position to the zSort.
 */
public class YSortItem extends SortItem
{
  private var _yToZOffset:Number = 0;

  public function set yToZOffset(value:Number):void
  {
    if (_yToZOffset != value)
    {
      _yToZOffset = value;
      zSort = y + _yToZOffset;
    }
  }

  override public function set y(value:Number):void
  {
    if (value != super.y)
    {
      super.y = value;
      zSort = super.y + _yToZOffset;
    }
  }
}
}
